package pl.iachoo.ctl.tabory.ui.editors.trips;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.Form;
import org.eclipse.ui.forms.widgets.Section;

import pl.iachoo.ctl.tabory.ui.base.masterdetail.AbstractMasterDetailSection;

public class TripEditor
		extends
		AbstractMasterDetailSection<TripSelection, TripMasterSeterSectionPart, TripDetailsSectionPart> {
	
	public final static String ID = "pl.iachoo.ctl.tabory.ui.editors.trips.TripEditor";

	public TripEditor() throws Exception {
		super();
	}

	@Override
	protected TripMasterSeterSectionPart getMasterSection(Form parentForm) {
		TripMasterSeterSectionPart sectionPart = new TripMasterSeterSectionPart(
				form.getBody(), formToolkit, Section.TITLE_BAR, "trips master",
				true, false);
		sectionPart.setSelection(selection);
		return sectionPart;
	}

	@Override
	protected TripDetailsSectionPart getDetailSection(Form parentForm) {
		TripDetailsSectionPart sectionPart = new TripDetailsSectionPart(
				form.getBody(), formToolkit, Section.TITLE_BAR, "trip details");
		sectionPart.setSelection(selection);
		return sectionPart;
	}

	@Override
	protected void postInitGui(Composite parent) {
		// TODO Auto-generated method stub

	}

	@Override
	protected void doSave() throws Exception {
		// TODO Auto-generated method stub

	}

	@Override
	protected void doCancel() throws Exception {
		// TODO Auto-generated method stub

	}

	@Override
	protected TripSelection initSelection() throws Exception {
		// TODO Auto-generated method stub
		return new TripSelection();
	}

	@Override
	public void setFocus() {
		// TODO Auto-generated method stub

	}

}
